<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>文章显示页面</title>
<css file='__PUBLIC__/css/base.css' />
<jquery />
<js file='__PUBLIC__/js/iframe.js' />
<script type="text/javascript">
    $(function(){
		/**********************全选和反选**************************/
	$('.quanxuan').click(function(){
		var state = $(this).attr('news');
		$('.selected[news = "'+state+'"]').attr('checked','checked');
	});
	$('.fanxuan').click(function(){
		var state = $(this).attr('news');
		var arr = $('.selected[news = "'+state+'"]');
            for (var i = 0; i < arr.length; i++) {
                arr[i].checked = !arr[i].checked;
            }
	});
	$('.input_quanxuan').click(function(){
		var state = $(this).attr('news');
		if($(this).attr('checked') == 'checked'){
			$('.selected[news = "'+state+'"]').attr('checked','checked');
		}else if($(this).attr('checked') != 'checked'){
			$('.selected[news = "'+state+'"]').removeAttr('checked');
		}
	});
    })
</script>
</head>
<body>
	<div class='now_path'>
		<strong>您现在的位置是:</strong>
		<a href='#'>文章管理</a>>{$model_info.mname}({$model_info.title})
	</div>
	<div class="false_tabs">
            <a href="__WEB__/admin/news/model_news/mid/{$hd.get.mid}/status/1/recycled/0" <?php if((isset($_GET['status']) && $_GET['status'] != 0) && (isset($_GET['recycled']) && $_GET['recycled'] == 0)){?> class='cur_tabs' <?php } ?>>查看文章</a>
			<a href="__WEB__/admin/news/model_news/mid/{$hd.get.mid}/status/0/recycled/0" <?php if($_GET['status'] == 0 && $_GET['recycled'] == 0){?> class='cur_tabs' <?php } ?>>未审核文章</a>
			<a href="__WEB__/admin/news/model_news/mid/{$hd.get.mid}/status/100/recycled/1" <if value='$hd.get.recycled eq 1'>class='cur_tabs'<else /></if>>回收站</a>
	</div>
		<form action='?' method='post'>
			<table class="table1">
				<thead>
					<tr>
						<td width="10"><input type="checkbox" class='input_quanxuan' news='all'/></td>
						<td width="30">ID</td>
						<td width='280'>标题</td>
						<td width="100">栏目</td>
						<td width="60">点击率</td>
						<td width="100">作者</td>
						<td width="150">发布时间</td>
						<td width="60">审核</td>
						<td width="230">操作</td>
					</tr>
				</thead>
				<tbody>
				<empty value='$news'>
					<tr><td colspan='9'>没有任何文章</td></tr>
				<noempty />
				<list from="$news" name="$v">
					<tr>
						<td width="10"><input type="checkbox" name='xuanze[]' value='{$v.id}' class='selected' news='all'/></td>
						<td width="30">{$v.id}</td>
						<td><a href='__WEB__/index/content/index/nid/{$v.id}' target='__blank'>{$v.title}</a></td>
						<td width="160"><a href='__APP__/news/index/catid/{$v.catid}/mid/{$v.mid}'>{$v.cname}</a></td>
						<td width="60">{$v.click}</td>
						<td width="100">{$v.username}</td>
						<td width="150"><?php echo date('Y-m-d',$v['addtime']);  ?></td>
						<td width="60"><if value='$v.status'>已审核<else /><font sytle='color:red;'><font style='color:red;'>未审核</font></font></if></td>
						<td width="230" style="font-size:12px;">
						<a href="#">浏览</a> | 
						<a href="__WEB__/admin/news/news_modify/nid/{$v.id}/mid/{$hd.get.mid}/catid/{$v.catid}">编辑</a> | 
						<if value='$hd.get.recycled neq 1'>
						<a href="__WEB__/admin/news/news_recycle/nid/{$v.id}/mid/{$hd.get.mid}">删除</a> | 
						</if>
						<a href="#">评论</a>
						</td>
					</tr>
				</list>
				</empty>
				</tbody>  
			</table>
			<div class="send2 l">
				<a href="#" class="button1 quanxuan" news='all'>全选</a>
				<a href="#" class="button1 fanxuan" news='all'>反选</a>
				<if value='$hd.get.recycled neq 1'>
				<input type='submit' class='button2' value='删除' onclick='if(confirm("确定进行删除操作吗？")){this.form.action="__WEB__/admin/news/news_recycle/mid/{$hd.get.mid}";this.form.submit();}'/>
				<else />
				<input type='submit' class='button2' style='width:70px;' value='彻底删除' onclick='if(confirm("彻底删除吗？")){this.form.action="__WEB__/admin/news/news_recycle/mid/{$hd.get.mid}/del/true";this.form.submit();}'/>
				<input type='submit' class='button2' value='还原' onclick='if(confirm("确定还原吗？")){this.form.action="__WEB__/admin/news/news_huanyuan/mid/{$hd.get.mid}";this.form.submit();}'/>
				</if>
				<if value='$hd.get.recycled neq 1'>
				<?php $_GET['status'] = isset($_GET['status'])?$_GET['status']:1; ?>
				<if value='$hd.get.status'>
					<input type='submit' class='button2' value='未审' onclick="this.form.action='__WEB__/admin/news/news_shen_many/mid/{$hd.get.mid}/shenhe/0';this.form.submit();"/>
				<else />
					<input type='submit' class='button2' value='审核' onclick="this.form.action='__WEB__/admin/news/news_shen_many/mid/{$hd.get.mid}/shenhe/1';this.form.submit();"/>
				</if>
				</if>
			</div>
			<?php if($_GET['status'] == 1 && $_GET['recycled'] == 0){ ?>
			<div  class='flag l'>
			<ul>
				<foreach from='$attrs' value='$v'>
				<li class='fname'><label><input type='checkbox' name='attrrelation[]' value='{$v.aid}'/>{$v.aname}</label></li>
				</foreach>
				<li class='btn1'><input type='submit' value='提交' class='button3' onclick='this.form.action="__WEB__/admin/news/news_attr_many/mid/{$hd.get.mid}";this.form.submit();'/></li>
			<ul>
			</div>
			<div class='yidong l'>
				<ul>
					<li>
						<select name='yidong'>
							<option vlaue=''>--请选择栏目--</option>
							<foreach from='$category' value='$v'>
						       <if value="$v.level gt 1">
						        	<if value='$v.level eq 2'>
						            	<option value= "{$v.catid}" style='background:#eee;'>=>{$v.cname}</option>
									<else />
										<option value= "{$v.catid}">{$v.html}└{$v.cname}</option>
									</if>
					        	</if>
							</foreach>
						</select>
					</li>
					<li><input type='submit' value='移动到' class='button3' onclick='this.form.action="__WEB__/admin/news/news_yidong_many/mid/{$hd.get.mid}";this.form.submit();'/></li>
				</ul>
			</div>
			<?php  }?>
		<form>
		</div>
	<div class="page r" style="margin-top:10px;">{$page}</div>
</body>
</html>